package com.xinweisi.dataserver.timertask;

import com.xinweisi.dataserver.util.UserUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * DataLoading
 *
 * @author lijie1
 * @version 1.0
 * @date 2020/7/28 0028 9:33
 */
@Slf4j
@Component
public class DataLoading implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args){
        try {
            log.info("**********我是定时任务清除Redis**********");
            RedisClear.clearRedis();
            UserUtil.size = 0;
        }catch (Exception e){
            e.printStackTrace();
        }finally {

        }
    }
}
